package com.geely.design.abstractFactory;

/**
 * 抽象工厂和工厂方法的区别在于,实现逻辑由工厂
 * 子类去完成,一个产品族包含很多产品,可纵向扩展,
 * 不适合横向扩展,例如可添加HTML视频,不适合添加源码
 * 降低耦合度
 */
public class Test {
    public static void main(String[] args) {
        CourseFactory courseFactory = new JavaCourseFactory();
        Article article = courseFactory.getArticle();
        Video video = courseFactory.getVideo();
        article.produce();
        video.produce();
    }
}
